home *** CD-ROM | disk | FTP | other *** search
- /* MainWindow.c */ /* C14 Calculator */
-
- #include "MainWindow.h"
- #include "ResourceDefs.h"
- #include "WindowAids.h"
- #include "Miscellany.h"
-
- void MainWindowSeg() {}
-
- /*----------*/
- void OpenMainWindow (Str255 fName,
- short vRefNum,
- short fRefNum)
- {
- WindowPtr newWindow;
- Rect bounds;
-
- newWindow = GetWindow (MainWindowID);
- if (fName [0] != 0) {
- SetWTitle (newWindow, fName);
- }
- SetPort (newWindow);
- SetNewInfo (newWindow);
- /*cur->vScroll = nil;*/
- /* cur->hScroll = nil;*/
- cur->fileNum = fRefNum;
- cur->volNum = vRefNum;
- cur->dirty = false;
- cur->filename = NewString (fName);
- cur->windowKind = WMainWindow;
- ((WindowPeek) curWindow)->windowKind = userKind + WMainWindow;
- cur->witlHandle = GetResource ('Witl', MainWindowID);
- cur->wictHandle = GetResource ('Wict', MainWindowID);
-
-
- cur->text = nil;
-
- ShowWindow (newWindow);
-
- } /*OpenMainWindow*/
-
- /*----------*/
- void CloseMainWindow (void)
- {
-
- DisposHandle ((Handle) cur->filename);
- DiscardInfo (curWindow);
- } /*CloseMainWindow*/
-
- /*----------*/
- void ControlMainWindow (ControlHandle whichControl,
- short whichPart,
- Point where)
- {
- Rect bounds;
-
-
- } /*ControlMainWindow*/
-
- /*----------*/
- void MouseInMainWindow (Point where,
- short modifiers)
- {
- Rect bounds;
-
-
- } /*MouseInMainWindow*/
-
- /*----------*/
- void TypeInMainWindow (char ch)
- {
- if (cur->text == nil) {
- SysBeep (1);
- } else {
- TEKey (ch, cur->text);
- cur->dirty = true;
- }
- } /*TypeInMainWindow*/
-
- /*----------*/
- /*void UpdateMainWindow (void)*/
- /*{*/
- /* Rect bounds;*/
- /**/
- /* */
- /* DrawClippedGrow (-15, -15);*/
- /*} /*UpdateMainWindow*/
-
- /*----------*/
- void ActivateMainWindow (Boolean activate)
- {
-
- DrawClippedGrow (-15, -15);
- } /*ActivateMainWindow*/
-
- /*----------*/
- void ResizeMainWindow (void)
- {
- /* application-specific code to resize items in window */
- } /*ResizeMainWindow*/
-
- /*----------*/
- pascal void ScrollMainWindow (short newValue,
- short oldValue)
- {
- /* application-specific code to scroll window */
- } /*ScrollMainWindow*/
-
- /* MainWindow */